package com.hxkj.dao.impl;

import com.hxkj.dao.CompanyinfoDao;
import com.hxkj.mapper.CompanyinfoMapper;
import com.hxkj.domain.po.Companyinfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-06-05 19:32:55
*
*/
@Service("companyinfoDao")
public class CompanyinfoDaoImpl implements CompanyinfoDao {

    @Resource
    private CompanyinfoMapper companyinfoMapper;

    @Override
    public Companyinfo get(Long companyId) {
        return companyinfoMapper.selectByPrimaryKey(companyId);
    }

    @Override
    public List<Companyinfo> get(Companyinfo companyinfo) {
        return companyinfoMapper.select(companyinfo);
    }

    @Override
    public int delete(Long companyId) {
        return companyinfoMapper.deleteByPrimaryKey(companyId);
    }

    @Override
    public int delete(Companyinfo companyinfo) {
        return companyinfoMapper.delete(companyinfo);
    }

    @Override
    public int save(Companyinfo companyinfo) {
        return companyinfoMapper.insert(companyinfo);
    }

    @Override
    public int update(Companyinfo companyinfo) {
        return companyinfoMapper.update(companyinfo);
    }

    @Override
    public int getCompany(Companyinfo companyinfo) {
        return companyinfoMapper.getCompany(companyinfo);
    }

}
